﻿using System.Collections.Generic;
using Yun.Interface;
using Yun.Response;
using Yun.Util;

namespace Yun.Trade.Request
{
    /// <summary>
    /// 同意买家退货
    /// yun.trade.refund.returngoods.agree
    /// </summary>
    public class AgreeReturnGoodsRequest: ITopRequest<IntResultResponse>
    {
        /// <summary>
        /// 退款单编号
        /// </summary>
        public long OrderRefundId { get; set; }

        /// <summary>
        /// 凭证照片,多个用英文逗号隔开
        /// </summary>
        public string Images { get; set; }

        /// <summary>
        /// 备注留言
        /// </summary>
        public string Remark { get; set; }


        /// <summary>
        /// 退款地址ID
        /// </summary>
        public int AddressId { get; set; }


        public string GetApiName()
        {
            return "yun.trade.refund.returngoods.agree";
        }

        public IDictionary<string, string> GetParameters()
        {
            var parameters = new YunDictionary
            {
                {"orderrefundid",OrderRefundId},
                {"images",Images},
                {"remark",Remark},
                {"addressid",AddressId}
            };
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateMinValue("orderrefundid", OrderRefundId, 1);
        }
    }
}
